home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 October / MACPOWER-1997-10.ISO.7z / MACPOWER-1997-10.ISO / AMUG / INTERNET / HTML Grinder 3.21.sit / HTML Grinder / Grinder Tools / Index Builder / background_3802.xml next >
Extensible Markup Language  |  1997-07-01  |  4KB  |  44 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
  3. <background>
  4.     <id>3802</id>
  5.     <filler1>0</filler1>
  6.     <cantDelete> <false /> </cantDelete>
  7.     <showPict> <true /> </showPict>
  8.     <dontSearch> <false /> </dontSearch>
  9.     <link rel="stylesheet" type="text/css" href="stylesheet_3315.css" />
  10.     <part>
  11.         <id>5</id>
  12.         <type>button</type>
  13.         <visible> <true /> </visible>
  14.         <reserved5> 0 </reserved5>
  15.         <reserved4> 0 </reserved4>
  16.         <reserved3> 0 </reserved3>
  17.         <reserved2> 0 </reserved2>
  18.         <reserved1> 0 </reserved1>
  19.         <enabled> <true /> </enabled>
  20.         <rect>
  21.             <left>0</left>
  22.             <top>231</top>
  23.             <right>18</right>
  24.             <bottom>248</bottom>
  25.         </rect>
  26.         <style>opaque</style>
  27.         <showName> <false /> </showName>
  28.         <highlight> <false /> </highlight>
  29.         <autoHighlight> <true /> </autoHighlight>
  30.         <sharedHighlight> <true /> </sharedHighlight>
  31.         <family>0</family>
  32.         <titleWidth>0</titleWidth>
  33.         <icon>29540</icon>
  34.         <textAlign>center</textAlign>
  35.         <font>Chicago</font>
  36.         <textSize>12</textSize>
  37.         <textStyle>plain</textStyle>
  38.         <name>Help</name>
  39.         <script>on mouseUpfullhelpend mouseUpon mouseenterhelper "Click here for more help for HTML Grinder."end mouseenter</script>
  40.     </part>
  41.     <name></name>
  42.     <script>on processif there is no file (line 2 of cd fld basefolder) thenbeepanswer "The file you have specified for the Index doesn't exist. Click 窶彜elect Index File...窶 to choose a file."elseglobal indexlistput empty into indexlistpass processend ifend processon converter thefile,thecontentsglobal indexlistput line 2 of cd fld basefolder into baserput relativepath(baser,thefile) into thePathnameput extractTitle(thecontents) into theTitleif thetitle is empty then put filename(thefile) into thetitleif the hilite of cd btn "alphabetize" is true and word 1 of theTitle is "The" thendelete word 1 of theTitleput ", The" after theTitleend ifput theTitle &"窶「"&ThePathName &return after indexlistend converteron alldoneglobal indexlistset the itemdelimiter to "窶「"if the hilite of cd btn "alphabetize" is truethen sort lines of indexlist by item 1 of eachput the selectedtext of cd btn "format" into theformatrepeat with x = 1 to the number of lines in indexlistset cursor to busyput line x of indexlist into thisOneput item 1 of thisone into theTitleput item 2 of thisone into thePathget buildLink(theTitle,ThePath,theformat)put it into line x of indexlistend repeatset the itemdelimiter to ","if word 1 of theformat is "Unordered" thenput "<ul>"&return before indexlistput "</ul>" after indexListelse   if word 1 of theformat is "ordered" thenput "<ol>"&return before indexlistput "</ol>" after indexListend ifget attachindex(indexlist,line 2 of cd fld basefolder)if it is emptythen get "The index has been added to the file."put empty into indexlistsend "alldone it" to homie()end alldonefunction buildLink theTitle,thePath,formatget"<a href="&quote&thePath&quote&">"&theTitle&"</a>"if word 1 of format contains "ordered"then get "<li>"&itget it  & word 2 of formatreturn itend buildLinkfunction attachindex theIndex,thefileopen file thefileread from file thefile until eofclose file thefileput it into thecontents--put smartattach(thecontents,"<!--Index-->","<!--End of Index-->",theIndex,the selectedtext of cd btn "Append",cd fld texto) into newcontents--if newcontents contains "Error:"then return newcontentselseopen file thefilewrite newcontents to file thefileclose file thefilereturn ""end ifend attachindexon resetwheelput empty into cd fld basefolderput "</body>" into cd fld textoshow cd fld textoset the hilite of cd btn alphabetize to trueselect line 4 of cd btn formatselect line 3 of cd btn appendput the left of cd btn append into theleftset the width of cd btn append to 129set the left of cd btn append to theleftpass resetwheelend resetwheel</script>
  43. </background>
  44.